<template>
	<view class="content">
		<image class="custom-bj" src="@/static/images/news/min-bj.png"></image>
		<view class="detail">
			<view class="title">{{ item.title }}</view>
			<view class="value">
				<view v-html="item.content"></view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			item: {}
		};
	},

	onLoad(options) {
		this.$service.news.notices
			.info({
				id: options.id
			})
			.then(res => {
				this.item = res[0];
				
				if (this.item.status == 0) {
					this.$service.news.notices
						.updateStatusById({
							id: this.item.id
						})
						.catch(err => {
							uni.showToast({
								title: err.message,
								icon: 'none'
							});
						});
				}
			})
	},

	methods: {}
};
</script>
<style lang="scss" scoped>
.content {
	background: #f6f7fa;
	height: 100vh;
	.custom-bj {
		width: 100%;
		height: 172rpx;
		position: relative;
		z-index: 10;
	}
	.detail {
		position: relative;
		z-index: 20;
		width: 714rpx;
		min-height: 500rpx;
		margin: auto;
		margin-top: -120rpx;
		margin-bottom: 50rpx;
		background: #ffffff;
		border-radius: 20rpx;
		overflow: hidden;
		.title {
			color: #171717;
			font-size: 32rpx;
			text-align: center;
			margin-top: 44rpx;
			padding: 0 50rpx;
			font-weight: 600;
		}
		.value {
			color: #343434;
			font-size: 28rpx;
			padding: 40rpx 60rpx;
		}
	}
}
</style>
